# -*- coding: utf-8 -*-
"""
Created on Fri Oct  1 09:46:45 2021

@author: Administrator
"""

class Solution:
    def reverseArray(self,nums):
        start = 0
        end = -1
        for _ in range(len(nums)//2):
            nums[start],nums[end]=nums[end],nums[start]
            start += 1
            end -= 1
        return nums
    
if __name__ == "__main__":
    nums = [1,2,5]
    solution = Solution()
    print("输入的数组是：",nums)
    print("翻转之后的结果是：",solution.reverseArray(nums))